package Chris.Project;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class DataLayer {	 
	private DbHelper _dbHelper;
	
	public DataLayer(Context c) {
	        _dbHelper = new DbHelper(c);
		    }
	 
	public void AddEvent(int Id, int Event , int Locatie, int kosten/*, int minimumleeftijd*/ ) {
	       SQLiteDatabase db = _dbHelper.getWritableDatabase();
	       try {
	            ContentValues values = new ContentValues();
	            values.put("PlayerId", Event);
	            values.put("Result", Locatie);
		        values.put("PlayTime", kosten);
		      /*  values.put("Difficulty", minimumleeftijd)*/;
		
		        db.insert("Events", "", values);
		       } finally {
		            if (db != null)
		                db.close();
		       }
		    }


		
	}
